package com.codegeek.project.cgAIOUtils;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author wj
 * @ClassName
 * @Description
 * @date 2019-12-26
 */
public class CGRedisBaseEntity implements Serializable {

    /* 更新时间*/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * @title CGRedisBaseEntity
     * @description 构造函数，初始化属性
     * @param
     * @return
     * @throws
     */
    public CGRedisBaseEntity(){
        updateTime=new Date();
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * @title: refreshTime
     * @description 刷新时间，更新updateTime为当前时间
     * @param
     * @return
     * @throws
     */
    public void refreshTime(){
        updateTime=new Date();
    }


}
